package com.zhongwang.business.module.main.service;

import com.zhongwang.business.module.main.dao.ProdOrdMapper;
import com.zhongwang.business.module.main.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 项目变更记录查询
 * @author 徐一贺
 */
@Service
public class ProjectChangeQueryService {

    @Autowired
    private ProdOrdMapper prodOrdMapper;

    /**
     * 变更列表
     *
     * @param model
     * @return
     */
    public List<ProjectSchedulingModel> selectProjectChangeList(ProjectSchedulingModel model) {
        return prodOrdMapper.selectProjectChangeList(model);
    }

    /**
     * 查询变更
     * @param proChangeId
     * @return
     */
    public ProjectModel selectChangeInfoById(Integer proChangeId) {
        return prodOrdMapper.selectChangeInfoById(proChangeId);
    }
    /**
     * 查询变更
     * @param proChangeId
     * @return
     */
    public ProChange selectByPrimaryKey(Integer proChangeId) {
        return prodOrdMapper.selectByPrimaryKey(proChangeId);
    }
    /**
     * 查询意向
     * @param preEnqId
     * @return
     */
    public PreEnquiry selectPreEnqById(Integer preEnqId) {
        return prodOrdMapper.selectPreEnqById(preEnqId);
    }

    /**
     * 查询附件
     * @param id
     * @param origId
     * @return
     */
    public List<PreEnquiryFile> findChangeFileListByEnquiryId(Integer id, Integer origId) {
        return prodOrdMapper.findChangeFileListByEnquiryId(id,origId);
    }

    /**
     * 根据主键获取附件对象
     * @param id
     * @return
     */
    public VwPreEnquiryFile getVwPreEnquiryFileByPrimary(Integer id) {
        return prodOrdMapper.getVwPreEnquiryFileByPrimary(id);
    }
}
